/******************** (C) COPYRIGHT 2021 sinowealth ***************************
 * @file    :  sh30f9820_main.c     
 * @platform:  sh30f9820 target board
 * @hardware: ---------------------------------------------------------------
 *           |                                                               |
 *            --------------------------------------------------------------- 
 * @author  :  sinowealth
 * @version :  V1.1.0
 * @date    :  19-July-2021
 * @brief   :
**********************************************************************************/

/* Includes ------------------------------------------------------------------*/
//#include "sh30f9820.h"
//#include "sh30f9xx_sa0_retarget.h"
#include "..\..\User\config.h"
#include "Global.h"

#define  NVIC_VectTab_FLASH   ((uint32_t)0x00000000)
#define  NVIC_VectTab_OFFSET  ((uint32_t)0x4000)

/**
  ******************************************************************************
  * @file     int main(void)
  * @author   sinowealth
  * @version  V1.1.0
  * @date     19-July-2021
  * @brief    
  ******************************************************************************
  */
  int a =0;
int main(void)
{
	
    __disable_irq();
//	NVIC_SetVectorTable(NVIC_VectTab_FLASH, NVIC_VectTab_OFFSET);
    BSP_IWDT_Init();
    BSP_LVR_Init();
	Init_Systick();
    BSP_Timer_Init();
    BSP_UART_Init();
    BSP_GPIO_Init();
    BSP_PWM_Init();
    BSP_EXIT_Init();
    BSP_NVIC_Init();

    __enable_irq();
	Timer_Init();
	
	bsp_InitKey();
	bsp_InitLED();
	bsp_InitUart();
	Api_Tick_Init();
	Api_Init_Light();
	Api_Knob_Init();
	Api_RTC_Init();
	Api_Pwm_KnobBrightness_Init();
	//Api_Twi_BL5372_Init();
	f_Flow_Init();
	app_InitFrame_Power();
	app_InitFrame_Head();
	app_InitFRAME_Wifi();
	Stove_Init();
	
	Api_TM1652_Init();
	sMachine_Init();
#ifdef _MODULE_DBG_PRINTF
    RetargetInit();
    printf("Welcome to use SINOWEALTH SH30F9820!\n");
#endif

    /* Infinite loop */
    while (1)
    {
		 a = FAN_SPPED_MAX7;

      //  Firmware_Upgrade();
		App_Cycle();
    }
}

/******************* (C) COPYRIGHT 2021 Sinowealth *****END OF FILE************/
